<h1>Listing journals</h1>

<table>
  <tr>
  <% for column in Journal.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for journal in @collection %>
  <tr>
  <% for column in Journal.content_columns %>
    <td><%=h journal.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Show', :action => 'show', :id => journal %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => journal %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => journal }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>
<div id="buttonsNavigator">
<%= link_to 'Previous page', { :page => @pages.current.previous }, :class => 'cssbutton' if @pages.current.previous %>
<%= link_to 'Next page', { :page => @pages.current.next }, :class => 'cssbutton' if @pages.current.next %> 
</div>
<br />
<div id="buttonsNavigator">
<%= link_to 'New journal', {:action => 'new'}, :class => 'cssbutton' %>
</div>